import request from '@/utils/request'

// 专区课程分页
export function zoneSpherePage(data) {
  return request({url: '/course/admin/zone/sphere/page', method: 'post', data})
}

// 专区全景修改
export function zoneSphereEdit(data) {
  return request.put('/course/admin/zone/sphere/edit', data)
}

// 专区全景保存
export function zoneSphereSave(data) {
  return request.post('/course/admin/zone/sphere/save', data)
}

// 专区全景修改
export function zoneSphereDelete(data) {
  return request.delete('/course/admin/zone/sphere/delete?id=' + data.id, data)
}

// 专区分页
export function zonePage(data) {
  return request({url: '/course/admin/zone/page', method: 'post', data})
}

// 专区修改
export function zoneEdit(data) {
  return request.put('/course/admin/zone/edit', data)
}

// 专区保存
export function zoneSave(data) {
  return request.post('/course/admin/zone/save', data)
}

// 专区修改
export function zoneDelete(data) {
  return request.delete('/course/admin/zone/delete?id=' + data.id, data)
}

// 分类列表
export function categoryList(data) {
  return request({url: '/course/admin/category/list', method: 'post', data: data})
}

// 分类修改
export function categoryEdit(data) {
  return request.put('/course/admin/category/edit', data)
}

// 分类保存
export function categorySave(data) {
  return request.post('/course/admin/category/save', data)
}

// 分类修改
export function categoryDelete(data) {
  return request.delete('/course/admin/category/delete?id=' + data.id, data)
}

// 资源分页
export function resourcePage(params, pageCurrent = 1, pageSize = 20) {
  return request({url: '/course/admin/resource/page', method: 'post', data: {pageCurrent: pageCurrent, pageSize: pageSize, ...params}})
}

// 资源修改
export function resourceEdit(data) {
  return request.put('/course/admin/resource/edit', data)
}

// 资源保存
export function resourceSave(data) {
  return request.post('/course/admin/resource/save', data)
}

// 资源修改
export function resourceDelete(data) {
  return request.delete('/course/admin/resource/delete?id=' + data.id, data)
}

// 全景章节分页
export function courseChapterPeriodPage(params, pageCurrent = 1, pageSize = 20) {
  return request({url: '/course/admin/sphere/chapter/period/page', method: 'post', data: {pageCurrent: pageCurrent, pageSize: pageSize, ...params}})
}

// 全景章节修改
export function courseChapterPeriodEdit(data) {
  return request.put('/course/admin/sphere/chapter/period/edit', data)
}

// 全景章节保存
export function courseChapterPeriodSave(data) {
  return request.post('/course/admin/sphere/chapter/period/save', data)
}

// 全景章节修改
export function sphereChapterPeriodDelete(data) {
  return request.delete('/course/admin/sphere/chapter/period/delete?id=' + data.id, data)
}

// 全景章分页
export function sphereChapterPage(params, pageCurrent = 1, pageSize = 20) {
  return request({url: '/course/admin/sphere/chapter/page', method: 'post', data: {pageCurrent: pageCurrent, pageSize: pageSize, ...params}})
}

// 全景章修改
export function sphereChapterEdit(data) {
  return request.put('/course/admin/sphere/chapter/edit', data)
}

// 全景章保存
export function sphereChapterSave(data) {
  return request.post('/course/admin/sphere/chapter/save', data)
}

// 全景章修改
export function sphereChapterDelete(data) {
  return request.delete('/course/admin/sphere/chapter/delete?id=' + data.id, data)
}

// 全景分页
export function spherePage(params, pageCurrent = 1, pageSize = 20) {
  return request({url: '/course/admin/sphere/page', method: 'post', data: {pageCurrent: pageCurrent, pageSize: pageSize, ...params}})
}

// 全景修改
export function sphereEdit(data) {
  return request.put('/course/admin/sphere/edit', data)
}

// 全景保存
export function sphereSave(data) {
  return request.post('/course/admin/sphere/save', data)
}

// 全景修改
export function sphereDelete(data) {
  return request.delete('/course/admin/sphere/delete?id=' + data.id, data)
}

// 分页
export function userspherePage(params, pageCurrent = 1, pageSize = 20) {
  return request({url: '/course/admin/user/sphere/page', method: 'post', data: {pageCurrent: pageCurrent, pageSize: pageSize, ...params}})
}

// 分页
export function userStudyePage(params, pageCurrent = 1, pageSize = 20) {
  return request({url: '/course/admin/user/study/page', method: 'post', data: {pageCurrent: pageCurrent, pageSize: pageSize, ...params}})
}
